This is was the ultimate pagination class that allows you to easily deliver your content in bite-sized chunks. We do this much better now at BootPress using the Twitter Bootstrap Class. However, the downloadable class here may be used thus:
$page->link('pagination.css');
$links = new Pagination (1000);
$html .= $links->display();Two excellent resources are at:
This is the constructor for the class, and it creates a pagination object.
| $query | A MySQL query that returns the total number of records, or if you already know then you can just put the number here. |
| $display | How many records you would like to display at a time. |
| Example | |
This method will return the appropriate ' LIMIT start, display' string for your query to return the desired records.
| Returns | A string to finish off your MySQL query. |
| Example | |
This is the paginator method. Put it where you want your links to be displayed.
| $split | How many links you would like to be on either side of the current page. |
| Returns | A string of code to add to your $html. |
| Example | |